<!DOCTYPE html>
<html>
<head th:include="common/header_css::header('霸王餐小程序后台管理-商品信息','%mfile%datepicker%summernote')"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox float-e-margins">
        <div th:replace="common/toolbar::toolbar('商品信息管理')"></div>
        <div th:replace="common/search::search('%gtype%add%qtype%state')"></div>
    </div>
</div>

<!--添加Goods模态框-->
<div id="modal-add-form" class="modal fade" aria-hidden="true">
    <div class="modal-dialog" style="width: 800px;">
        <div class="modal-content">
            <div class="modal-body">
                <div class="row">
                    <h3 class="m-t-none m-b">商品信息添加</h3>
                    <div class="col-sm-12">
                        <div class="ibox float-e-margins">
                            <div class="ibox-content">
                                <form id="aform" method="post" class="form-horizontal" action="add"
                                      onsubmit="return checkAdd()">
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">商品名*
                                                </label>
                                                <div class="col-sm-10">
                                                    <input class="form-control" name="name"
                                                           required type="text" maxlength="255"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">商品分类*
                                                </label>
                                                <div class="col-sm-8">
                                                    <select onchange="gcsel(this.value)" class="form-control select2"
                                                            name="cid">
                                                        <option value="">请选择分类</option>
                                                        <option th:each="c:${categorys}" th:value="${c.id}"
                                                                th:text="${c.name}"></option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">成本价</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="minPrice" type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">商品原价*
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="price" required type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">实际售价*
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="saleprice" required
                                                           type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">商品特色</label>
                                                <div class="col-sm-10">
                                                    <input class="form-control" name="characteristic" type="text"
                                                           maxlength="255"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">产品类型*
                                                </label>
                                                <div class="col-sm-8">
                                                    <select class="form-control" name="gtype">
                                                        <option value="1">实物产品</option>
                                                        <option value="2">虚拟产品</option>
                                                        <option value="3">到店服务</option>
                                                        <option value="4">上门服务</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">总库存数</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="stores" type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">营销类型*
                                                </label>
                                                <div class="col-sm-8">
                                                    <select class="form-control" name="type">
                                                        <option value="0">商城商品</option>
                                                        <option value="1">拼团活动</option>
                                                        <option value="2">砍价活动</option>
                                                        <option value="3">抽奖活动</option>
                                                        <option value="7">大礼包活动</option>
                                                        <option value="8">秒杀活动</option>
                                                        <option value="9">报名活动</option>
                                                        <option value="10">投票活动</option>
                                                        <option value="13">集赞活动</option>
                                                        <option value="-1">积分商品</option>
                                                        <option value="-2">券商品</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">兑换积分</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="jifen" type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">是否支持会员余额交易</label>
                                                <div class="col-sm-8">
                                                    <input type="checkbox" class="js-switch" name="isMember" value="-1">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">是否支持积分抵扣交易</label>
                                                <div class="col-sm-8">
                                                    <input type="checkbox" class="js-switch" name="isJifen" value="-1">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">是否支持优惠券交易</label>
                                                <div class="col-sm-8">
                                                    <input type="checkbox" class="js-switch" name="isCoupon" value="-1">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">是否推荐商品</label>
                                                <div class="col-sm-8">
                                                    <input type="checkbox" class="js-switch" name="isRecommend"
                                                           value="-1">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">是否热卖商品</label>
                                                <div class="col-sm-8">
                                                    <input type="checkbox" class="js-switch" name="isHot" value="-1">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">最大可扣除积分比例</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control" name="maxUseJifen">
                                                        <option value="0">0</option>
                                                        <option value="0.1">10%</option>
                                                        <option value="0.2" selected>20%</option>
                                                        <option value="0.3">30%</option>
                                                        <option value="0.4">40%</option>
                                                        <option value="0.5">50%</option>
                                                        <option value="0.6">60%</option>
                                                        <option value="0.7">70%</option>
                                                        <option value="0.8">80%</option>
                                                        <option value="0.9">90%</option>
                                                        <option value="1">100%</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">商品重量</label>
                                                <div class="col-sm-8">
                                                    <div class="input-group m-b">
                                                        <input name="weight" type="number" class="form-control"> <span
                                                            class="input-group-addon">Kg</span>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">限购数量</label>
                                                <div class="col-sm-8">
                                                    <div class="input-group m-b">
                                                        <input class="form-control" id="xiangou2" name="xiangou"
                                                               type="number" value="0"/><span class="input-group-addon">0表示不限购</span>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">转发文案</label>
                                                <div class="col-sm-10">
                                                    <textarea name="sharewa" class="form-control"
                                                              maxlength="30"></textarea>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">商品缩略图</label>
                                                <div class="col-sm-10">
                                                    <input id="mfilepic" name="mfile" type="file" class="file"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">商品轮播图(拖动图片可以调整展示顺序)</label>
                                                <div class="col-sm-10">
                                                    <div id="sortphotos" class="tile__list"></div>
                                                    <input id="mfilephotos" name="mfile" multiple type="file"
                                                           class="file"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">文字简介</label>
                                                <div class="col-sm-10">
                                                    <textarea name="jieshao" class="form-control"
                                                              maxlength="1000"></textarea>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">商品详情(拖动图片可以调整展示顺序)</label>
                                                <div class="col-sm-10">
                                                    <div id="sortinfo" class="tile__list"></div>
                                                    <input id="mfileinfo" name="mfile" multiple type="file"
                                                           class="file"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <!--<div class="row">-->
                                    <!--<div class="col-md-12">-->
                                    <!--<div class="form-group">-->
                                    <!--<label class="col-sm-2 control-label">包装清单</label>-->
                                    <!--<div class="col-sm-10">-->
                                    <!--<input id="mfilepackinglist" name="mfile" multiple type="file" class="file"/>-->
                                    <!--</div>-->
                                    <!--</div>-->
                                    <!--</div>-->
                                    <!--</div>-->
                                    <!--<div class="row">-->
                                    <!--<div class="col-md-12">-->
                                    <!--<div class="form-group">-->
                                    <!--<label class="col-sm-2 control-label">售后服务</label>-->
                                    <!--<div class="col-sm-10">-->
                                    <!--<input id="mfileafterservice" name="mfile" multiple type="file" class="file"/>-->
                                    <!--</div>-->
                                    <!--</div>-->
                                    <!--</div>-->
                                    <!--</div>-->
                                    <!--<div class="row">-->
                                    <!--<div class="col-md-12">-->
                                    <!--<div class="form-group">-->
                                    <!--<label class="col-sm-2 control-label">规格参数</label>-->
                                    <!--<div class="col-sm-10">-->
                                    <!--<input id="mfileintroduction" name="mfile" multiple type="file" class="file"/>-->
                                    <!--</div>-->
                                    <!--</div>-->
                                    <!--</div>-->
                                    <!--</div>-->
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">转发海报</label>
                                                <div class="col-sm-10">
                                                    <input id="mfileshareimg" name="mfile" type="file" class="file"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">首页展示图</label>
                                                <div class="col-sm-10">
                                                    <input id="mfilehomeurl" name="mfile" type="file" class="file"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-4 col-sm-offset-2">
                                            <button class="btn btn-primary" type="submit">保存内容</button>
                                            <button data-toggle="modal" type="button" class="btn btn-white" href="#modal-add-form">取消</button>
                                        </div>
                                    </div>
                                    <input id="hidphotos" name="photos" type="hidden" value=""/>
                                    <input id="hidpic" name="pic" type="hidden" value=""/>
                                    <input id="hidinfo" name="info" type="hidden" value=""/>
                                    <input id="hidpackinglist" name="packinglist" type="hidden"/>
                                    <input id="hidafterservice" name="afterservice" type="hidden"/>
                                    <input id="hidintroduction" name="introduction" type="hidden"/>
                                    <input id="hidhomeurl" name="homeurl" type="hidden"/>
                                    <input id="hidshareimg" name="shareimg" type="hidden"/>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--修改Goods模态框-->
<div id="modal-form" class="modal fade" aria-hidden="true">
    <div class="modal-dialog" style="width: 800px;">
        <div class="modal-content">
            <div class="modal-body">
                <div class="row">
                    <h3 class="m-t-none m-b">商品信息修改</h3>
                    <div class="col-sm-12">
                        <div class="ibox float-e-margins">
                            <div class="ibox-content">
                                <form id="mform" method="post" class="form-horizontal" action="modify"
                                      onsubmit="return checkModify()">
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">商品名*
                                                </label>
                                                <div class="col-sm-10">
                                                    <input class="form-control" id="name" name="name"
                                                           required type="text" maxlength="255"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">商品分类*
                                                </label>
                                                <div class="col-sm-8">
                                                    <select onchange="gcsel(this.value)" class="form-control select2"
                                                            name="cid" id="cid">
                                                        <option value="0">暂无分类</option>
                                                        <option th:each="c:${categorys}" th:value="${c.id}"
                                                                th:text="${c.name}"></option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">成本价</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="minPrice" name="minPrice"
                                                           type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">商品原价*
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="price" name="price"
                                                           required type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">实际售价*
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="saleprice" name="saleprice"
                                                           required type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">商品特色</label>
                                                <div class="col-sm-10">
                                                    <input class="form-control" id="characteristic"
                                                           name="characteristic" type="text" maxlength="255"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">产品类型*
                                                </label>
                                                <div class="col-sm-8">
                                                    <select class="form-control" name="gtype" id="gtype">
                                                        <option value="1">实物产品</option>
                                                        <option value="2">虚拟产品</option>
                                                        <option value="3">到店服务</option>
                                                        <option value="4">上门服务</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">总库存数</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="stores" name="stores"
                                                           type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">已售</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="numberSale" name="numberSale"
                                                           type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">浏览次数</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="views" name="views" type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">营销类型*</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control" name="type" id="type" disabled>
                                                        <option value="0">商城商品</option>
                                                        <option value="1">拼团活动</option>
                                                        <option value="2">砍价活动</option>
                                                        <option value="3">抽奖活动</option>
                                                        <option value="7">大礼包活动</option>
                                                        <option value="8">秒杀活动</option>
                                                        <option value="9">报名活动</option>
                                                        <option value="10">投票活动</option>
                                                        <option value="13">集赞活动</option>
                                                        <option value="-1">积分商品</option>
                                                        <option value="-2">券商品</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">兑换积分</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="jifen" name="jifen" type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">是否支持会员余额交易</label>
                                                <div class="col-sm-8">
                                                    <input type="checkbox" id="isMember" name="isMember" value="-1">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">是否支持积分抵扣交易</label>
                                                <div class="col-sm-8">
                                                    <input type="checkbox" id="isJifen" name="isJifen" value="-1">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">是否支持优惠券交易</label>
                                                <div class="col-sm-8">
                                                    <input type="checkbox" id="isCoupon" name="isCoupon" value="-1">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">是否推荐商品</label>
                                                <div class="col-sm-8">
                                                    <input type="checkbox" id="isRecommend" name="isRecommend"
                                                           value="-1">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">是否热卖</label>
                                                <div class="col-sm-8">
                                                    <input type="checkbox" id="isHot" name="isHot" value="-1">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">最大可扣除积分比例</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control" id="maxUseJifen" name="maxUseJifen">
                                                        <option value="0">0</option>
                                                        <option value="0.1">10%</option>
                                                        <option value="0.2" selected>20%</option>
                                                        <option value="0.3">30%</option>
                                                        <option value="0.4">40%</option>
                                                        <option value="0.5">50%</option>
                                                        <option value="0.6">60%</option>
                                                        <option value="0.7">70%</option>
                                                        <option value="0.8">80%</option>
                                                        <option value="0.9">90%</option>
                                                        <option value="1">100%</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">商品重量</label>
                                                <div class="col-sm-8">
                                                    <div class="input-group m-b">
                                                        <input id="weight" name="weight" type="number"
                                                               class="form-control">
                                                        <span class="input-group-addon">Kg</span>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">限购数量</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="xiangou" name="xiangou"
                                                           type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">商品缩略图</label>
                                                <div class="col-sm-10">
                                                    <input id="mfilepic2" name="mfile" type="file" class="file"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">商品轮播图(拖动图片可以调整展示顺序)</label>
                                                <div class="col-sm-10">
                                                    <div id="sortphotos2" class="tile__list"></div>
                                                    <input id="mfilephotos2" name="mfile" multiple type="file"
                                                           class="file"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">转发文案</label>
                                                <div class="col-sm-10">
                                                    <textarea id="sharewa" name="sharewa" class="form-control"
                                                              maxlength="30"></textarea>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">文字简介</label>
                                                <div class="col-sm-10">
                                                    <textarea id="jieshao" name="jieshao" class="form-control"
                                                              maxlength="1000"></textarea>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">商品详情(拖动图片可以调整展示顺序)</label>
                                                <div class="col-sm-10">
                                                    <div id="sortinfo2" class="tile__list"></div>
                                                    <input id="mfileinfo2" name="mfile" multiple type="file"
                                                           class="file"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <!--<div class="row">-->
                                    <!--<div class="col-md-12">-->
                                    <!--<div class="form-group">-->
                                    <!--<label class="col-sm-2 control-label">包装清单</label>-->
                                    <!--<div class="col-sm-10">-->
                                    <!--<input id="mfilepackinglist2" name="mfile" multiple type="file" class="file"/>-->
                                    <!--</div>-->
                                    <!--</div>-->
                                    <!--</div>-->
                                    <!--</div>-->
                                    <!--<div class="row">-->
                                    <!--<div class="col-md-12">-->
                                    <!--<div class="form-group">-->
                                    <!--<label class="col-sm-2 control-label">售后服务</label>-->
                                    <!--<div class="col-sm-10">-->
                                    <!--<input id="mfileafterservice2" name="mfile" multiple type="file" class="file"/>-->
                                    <!--</div>-->
                                    <!--</div>-->
                                    <!--</div>-->
                                    <!--</div>-->
                                    <!--<div class="row">-->
                                    <!--<div class="col-md-12">-->
                                    <!--<div class="form-group">-->
                                    <!--<label class="col-sm-2 control-label">规格参数</label>-->
                                    <!--<div class="col-sm-10">-->
                                    <!--<input id="mfileintroduction2" name="mfile" multiple type="file" class="file"/>-->
                                    <!--</div>-->
                                    <!--</div>-->
                                    <!--</div>-->
                                    <!--</div>-->
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">转发海报</label>
                                                <div class="col-sm-10">
                                                    <input id="mfileshareimg2" name="mfile" type="file" class="file"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">首页展示图</label>
                                                <div class="col-sm-10">
                                                    <input id="mfilehomeurl2" name="mfile" type="file" class="file"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-4 col-sm-offset-2">
                                            <button class="btn btn-primary" type="submit">保存内容</button>
                                            <button data-toggle="modal" type="button" class="btn btn-white"
                                                    href="#modal-form">取消
                                            </button>
                                        </div>
                                    </div>
                                    <input id="hidphotos2" name="photos" type="hidden" value=""/>
                                    <input id="hidphotos2bak" type="hidden" value=""/>
                                    <input id="hidinfo2" name="info" type="hidden" value=""/>
                                    <input id="hidinfo2bak" type="hidden" value=""/>
                                    <input id="hidpic2" name="pic" type="hidden" value=""/>
                                    <input id="hidpackinglist2" name="packinglist" type="hidden" value=""/>
                                    <input id="hidafterservice2" name="afterservice" type="hidden" value=""/>
                                    <input id="hidintroduction2" name="introduction" type="hidden" value=""/>
                                    <input id="hidhomeurl2" name="homeurl" type="hidden" value=""/>
                                    <input id="hidshareimg2" name="shareimg" type="hidden" value=""/>
                                    <input id="id" name="id" type="hidden" value=""/>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--设置拼团模态框-->
<div id="modal-pintuan-form" class="modal fade" aria-hidden="true">
    <div class="modal-dialog" style="width: 800px;">
        <div class="modal-content">
            <div class="modal-body">
                <div class="row">
                    <h3 class="m-t-none m-b">商品拼团设置</h3>
                    <div class="col-sm-12">
                        <div class="ibox float-e-margins">
                            <div class="ibox-content">
                                <form id="pform" method="post" class="form-horizontal" action="setpintuan"
                                      onsubmit="return pintuan()">
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">拼团商品名*
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="ptname" name="name" required
                                                           type="text"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">几人成团</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="ptotal" name="ptotal" required
                                                           type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">商品原价*</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="ptprice" name="price" required
                                                           type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">拼团价</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="ptsaleprice" name="saleprice"
                                                           type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">开始日期*
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="ptdateStart" name="dateStart"
                                                           required type="date" readonly/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">结束日期*
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="ptdateEnd" name="dateEnd" required
                                                           type="date" readonly/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <!--<div class="row">-->
                                    <!--<div class="col-md-6">-->
                                    <!--<div class="form-group">-->
                                    <!--<label class="col-sm-4 control-label">分享奖励类型</label>-->
                                    <!--<div class="col-sm-8">-->
                                    <!--<select class="form-control" name="shareBonusType">-->
                                    <!--<option value="0">分享无奖励</option>-->
                                    <!--<option value="1">送积分</option>-->
                                    <!--<option value="2">送现金</option>-->
                                    <!--<option value="3">送优惠券</option>-->
                                    <!--</select>-->
                                    <!--</div>-->
                                    <!--</div>-->
                                    <!--</div>-->
                                    <!--<div class="col-md-6">-->
                                    <!--<div class="form-group">-->
                                    <!--<label class="col-sm-4 control-label">奖励额</label>-->
                                    <!--<div class="col-sm-8">-->
                                    <!--<input class="form-control" name="shareMount" type="number"/>-->
                                    <!--</div>-->
                                    <!--</div>-->
                                    <!--</div>-->
                                    <!--</div>-->
                                    <div class="form-group">
                                        <div class="col-sm-4 col-sm-offset-2">
                                            <button class="btn btn-primary" type="submit">保存内容</button>
                                            <button data-toggle="modal" type="button" class="btn btn-white"
                                                    href="#modal-pintuan-form">取消
                                            </button>
                                        </div>
                                    </div>
                                    <input id="hidpgid" name="id" type="hidden"/>
                                    <input name="type" type="hidden" value="1"/>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--设置代理商品模态框-->
<div id="modal-daili-form" class="modal fade" aria-hidden="true">
    <div class="modal-dialog" style="width: 800px;">
        <div class="modal-content">
            <div class="modal-body">
                <div class="row">
                    <h3 class="m-t-none m-b">代理商品设置（注意：该商品设置成代理商品后，代理价格将覆盖原来设置的价格。成功购买代理商品的用户自动成为对应级别的代理）</h3>
                    <div class="col-sm-12">
                        <div class="ibox float-e-margins">
                            <div class="ibox-content">
                                <form id="dform" method="post" class="form-horizontal" action="setdaili"
                                      onsubmit="return daili()">
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">商品名
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="dlname" name="name" required
                                                           type="text"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">商品售价
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="dlprice" name="saleprice" readonly
                                                           type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">代理人级别</label>
                                                <div class="col-sm-8">
                                                    <select onchange="afxlevelChange(this.value)"
                                                            class="form-control select2" name="fxlevel" id="fxlevel">
                                                        <option th:each="c:${fxlist}" th:value="${c.fxlevel}"
                                                                th:text="${c.name}"></option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">代理人会费(元)</label>
                                                <div class="col-sm-8">
                                                    <select disabled class="form-control select2" id="huifei">
                                                        <option th:each="c:${fxlist}" th:value="${c.fxlevel}"
                                                                th:text="${c.huifei}"></option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-4 col-sm-offset-2">
                                            <button class="btn btn-primary" type="submit">保存</button>
                                            <button data-toggle="modal" type="button" class="btn btn-white"
                                                    href="#modal-daili-form">取消
                                            </button>
                                        </div>
                                    </div>
                                    <input id="fxgid" name="gid" type="hidden"/>
                                    <input id="hidhuifei" name="huifei" type="hidden" value="1"/>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--首页栏目分类-->
<div id="displayFL-form" class="modal fade" aria-hidden="true">
    <div class="modal-dialog" style="width: 800px;">
        <div class="modal-content">
            <div class="modal-body">
                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">首页栏目分类</label>
                            <div class="col-sm-10">
                                <select class="form-control select2" id="gdcid" name="gdcid">
                                    <option th:each="c:${fenleis}" th:value="${c.id}" th:text="${c.showname}"></option>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row" style="margin-top: 20px">
                    <div class="col-sm-4 col-sm-offset-2">
                        <button class="btn btn-primary" type="button" onclick="savedisplayFL()">保存内容</button>
                        <button data-toggle="modal" type="button" class="btn btn-white" href="#displayFL-form">取消
                        </button>
                        <input id="hidgid" name="id" type="hidden" value=""/>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--设置商品服务关联商家-->
<div id="guanlianSJ-form" tabindex="10" class="modal fade" aria-hidden="true">
    <div class="modal-dialog" style="width: 800px;">
        <div class="modal-content">
            <div class="modal-body">
                <div class="row">
                    <div class="col-md-8">
                    </div>
                    <div class="col-md-4">
                        <div class="pull-right">
                            <button class="btn-sm btn-info btn-sm" data-toggle="modal" href="#guanlianSJ-add-form"
                                    style="margin-left: 10px">
                                <i class="glyphicon glyphicon-plus" aria-hidden="true"></i>添加
                            </button>
                            <button data-toggle="modal" type="button" class="btn btn-white" href="#guanlianSJ-form">取消
                            </button>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="example">
                        <table id="gsmytable" class="table"></table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--设置到店服务商品关联商品-->
<div id="guanlianSP-form" tabindex="10" class="modal fade" aria-hidden="true">
    <div class="modal-dialog" style="width: 800px;">
        <div class="modal-content">
            <div class="modal-body">
                <div class="row">
                    <div class="col-md-8">
                    </div>
                    <div class="col-md-4">
                        <div class="pull-right">
<!--                            <button class="btn-sm btn-info btn-sm" data-toggle="modal" href="#guanlianSJ-add-form"-->
<!--                                    style="margin-left: 10px">-->
<!--                                <i class="glyphicon glyphicon-plus" aria-hidden="true"></i>添加-->
<!--                            </button>-->
                            <button data-toggle="modal" type="button" class="btn btn-white" href="#guanlianSP-form">关闭</button>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="example">
                        <table id="glspmytable" class="table"></table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--设置商品服务关联商家-->
<div id="guanlianSJ-add-form" tabindex="100" class="modal fade" aria-hidden="true" role="dialog">
    <div class="modal-dialog" style="width: 800px;">
        <div class="modal-content">
            <div class="modal-body">
                <div class="row">
                    <div class="col-sm-12">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                商品活动相关商家
                            </div>
                            <div class="panel-body form-inline" style="margin-bottom:0px;">
                                <div class="form-group">
                                    <div class="input-group">
                                        <div class="input-group-addon">关键词</div>
                                        <input type="text" class="form-control" style="width:200px;text-align: center"
                                               name="gssearch"
                                               id="gssearch" placeholder=""/>
                                    </div>
                                </div>
                                <div class="pull-right">
                                    <button class="btn-sm btn-primary btn-sm" onclick="guanlianSJSaveall()">
                                        <i class="glyphicon glyphicon-plus" aria-hidden="true"></i>保存
                                    </button>
                                    <button class="btn-sm btn-primary btn-sm" id="gssearch_btn">
                                        <i class="glyphicon glyphicon-search" aria-hidden="true"></i>查询
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-12">
                        <div class="example">
                            <table id="gstable" class="table"></table>
                        </div>
                    </div>
                </div>
                <div class="row" style="margin-top: 20px">
                    <div class="col-sm-4 col-sm-offset-2">
                        <button class="btn btn-primary" type="button" onclick="guanlianSJSaveall()">保存内容</button>
                        <button data-toggle="modal" type="button" class="btn btn-white" href="#guanlianSJ-add-form">取消</button>
                        <input id="hidgsid" name="gid" type="hidden" value=""/>
                        <input id="hidgsids" name="sids" type="hidden" value=""/>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--设置商品返利模态框-->
<div id="modal-fanli-form" class="modal fade" aria-hidden="true">
    <div class="modal-dialog" style="width: 900px;">
        <div class="modal-content">
            <div class="modal-body">
                <div class="row">
                    <h3 class="m-t-none m-b">自购返利设置+推荐返利设置</h3>
                    <div class="col-sm-12">
                        <div class="ibox float-e-margins">
                            <div class="ibox-content">
                                <form id="flform" method="post" class="form-horizontal" action="setfanli">
                                    <div class="row">
                                        <div class="col-md-4">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">商品名</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="goodsName" type="number" value=""/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-8">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">实售价格</label>
                                                <div class="col-sm-10">
                                                    <input class="form-control" id="saleprice" type="number" value=""/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-4">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">自购返类型</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control select2" id="zgfanType" name="zgfanType"
                                                            onchange="zgfanTypeChange(this.value)">
                                                        <option value="" selected>无返现</option>
                                                        <option value="1">送积分</option>
                                                        <option value="2">送现金</option>
                                                        <option value="3">送优惠券</option>
                                                        <option value="4">送虚拟币</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-4">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">自购返额度
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="zgfanMount" name="zgfanMount"
                                                           type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-4">
                                            <div class="form-group" id="zgfanquan" style="display: none">
                                                <label class="col-sm-4 control-label">自购返券
                                                </label>
                                                <div class="col-sm-8">
                                                    <select class="form-control select2" id="zgfanYwid"
                                                            name="zgfanYwid">
                                                        <option th:each="c:${quanlist}" th:value="${c.id}"
                                                                th:text="${c.name}"></option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-4">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">推荐返类型</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control select2" id="shareBonusType"
                                                            name="shareBonusType"
                                                            onchange="shareBonusTypeChange(this.value)">
                                                        <option value="">无奖励</option>
                                                        <option value="1">送积分</option>
                                                        <option value="2">送现金</option>
                                                        <option value="3">送优惠券</option>
                                                        <option value="4">送虚拟币</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-4">
                                            <div class="form-group" id="sharefanMount">
                                                <label class="col-sm-4 control-label">推荐返额度(非代理)</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="shareMount" name="shareMount" type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-4">
                                            <div class="form-group" id="sharefanquan" style="display: none">
                                                <label class="col-sm-4 control-label">推荐返券</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control select2" id="shareYwid"
                                                            name="shareYwid">
                                                        <option th:each="c:${quanlist}" th:value="${c.id}"
                                                                th:text="${c.name}"></option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-4">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">返利触发点</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control select2" id="fantimeType"
                                                            name="fantimeType">
                                                        <option value="1">成功下单|支付成功后</option>
                                                        <option value="2">确认收货|扫码核销后</option>
                                                        <option value="3">发货后7天到账</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-8">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">推荐返利模式</label>
                                                <div class="col-sm-10">
                                                    <select class="form-control select2" id="fxmode" name="fxmode" onchange="shareFxmodeChange(this.value)">
                                                        <option value="1">分销模式|会员推广才有奖励</option>
                                                        <option value="2">普通模式|任何人推广都有奖励(一级)</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row" id="fanliSetting">
                                        <h3 class="m-t-none m-b">如果不设置，默认按照代理固定提成比例提；反之则按照单品返利值返利</h3>
                                        <div class="col-md-4">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">一级返利(如果不设置，默认按照会员提成比例提)</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="fanli1" name="fanli1" type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-8">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">二级返利(如果不设置，默认按照会员提成比例提)</label>
                                                <div class="col-sm-10">
                                                    <input class="form-control" id="fanli2" name="fanli2" type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-4 col-sm-offset-2">
                                            <button class="btn btn-primary" type="submit">保存</button>
                                            <button data-toggle="modal" type="button" class="btn btn-white"
                                                    href="#modal-fanli-form">取消
                                            </button>
                                        </div>
                                    </div>
                                    <input id="fanligid" name="gid" type="hidden"/>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--设置商品群红包模态框-->
<div id="modal-qunzf-form" class="modal fade" aria-hidden="true">
    <div class="modal-dialog" style="width: 800px;">
        <div class="modal-content">
            <div class="modal-body">
                <div class="row">
                    <h3 class="m-t-none m-b">群转发</h3>
                    <div class="col-sm-12">
                        <div class="ibox float-e-margins">
                            <div class="ibox-content">
                                <form id="qunzfform" method="post" class="form-horizontal" action="setQunzf">
                                    <div class="row">
                                        <div class="col-md-4">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">群转发奖励类型</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control select2" id="jiangType" name="jiangType"
                                                            onchange="jiangTypeChange(this.value)">
                                                        <option value="1">送积分</option>
                                                        <option value="2">送现金</option>
                                                        <!--<option value="3">送优惠券</option>-->
                                                        <option value="4">送虚拟币</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-4">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">群转发奖励最高额度
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="jiangMount" name="jiangMount"
                                                           type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-4">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">群转发奖励份数
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="jiangFenshu" name="jiangFenshu"
                                                           type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-4">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">群转发最低点击人数</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="minDianji" name="minDianji"
                                                           type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-4">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">同一微信最多中几次</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="oneptimes" name="oneptimes"
                                                           type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-4">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">状态</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control select2" id="jiangState" name="state">
                                                        <option value="-1">无效</option>
                                                        <option value="1">有效</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-4 col-sm-offset-2">
                                            <button class="btn btn-primary" type="submit">保存</button>
                                            <button data-toggle="modal" type="button" class="btn btn-white"
                                                    href="#modal-qunzf-form">取消
                                            </button>
                                        </div>
                                    </div>
                                    <input id="qunzfgid" name="gid" type="hidden"/>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--添加Goods-SKU模态框-->
<div id="modal-sku-add-form" class="modal fade" aria-hidden="true">
    <div class="modal-dialog" style="width: 800px;">
        <div class="modal-content">
            <div class="modal-body">
                <div class="row">
                    <h3 class="m-t-none m-b">商品信息添加</h3>
                    <div class="col-sm-12">
                        <div class="ibox float-e-margins">
                            <div class="ibox-content">
                                <form id="askuform" method="post" class="form-horizontal" action="skuadd"
                                      onsubmit="return checkskuAdd()">
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">商品名*</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="name" id="askuname"
                                                           required type="text" maxlength="255"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">库存</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="stores" id="askustores"
                                                           required type="text" maxlength="255"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">原价*</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="askuprice" name="price" required/>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">实际售价*</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="askusaleprice" name="saleprice"
                                                           required/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">商品特色</label>
                                                <div class="col-sm-10">
                                                    <input class="form-control" id="askucharacteristic"
                                                           name="characteristic" type="text" maxlength="255"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">规格类型1*</label>
                                                <div class="col-sm-8">
                                                    <select onchange="skutypeChange(this.value,'asku1',1,'a')"
                                                            id="askutype1" class="form-control select2">
                                                        <option value="">请选择</option>
                                                        <option th:each="c:${skulist}" th:value="${c.id}"
                                                                th:text="${c.name}"></option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">规格1*</label>
                                                <div class="col-sm-8">
                                                    <select onchange="skuChange(this.value,1,'a')" id="asku1"
                                                            class="form-control select2">
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row" id="aguige2">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">规格类型2</label>
                                                <div class="col-sm-8">
                                                    <select onchange="skutypeChange(this.value,'asku2',2,'a')"
                                                            id="askutype2" class="form-control select2">
                                                        <option value="">请选择</option>
                                                        <option th:each="c:${skulist}" th:value="${c.id}"
                                                                th:text="${c.name}"></option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">规格2</label>
                                                <div class="col-sm-8">
                                                    <select onchange="skuChange(this.value,2,'a')" id="asku2"
                                                            class="form-control select2">
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row" id="aguige3">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">规格类型3</label>
                                                <div class="col-sm-8">
                                                    <select onchange="skutypeChange(this.value,'asku3',3,'a')"
                                                            id="askutype3" class="form-control select2">
                                                        <option value="">请选择</option>
                                                        <option th:each="c:${skulist}" th:value="${c.id}"
                                                                th:text="${c.name}"></option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">规格3</label>
                                                <div class="col-sm-8">
                                                    <select onchange="skuChange(this.value,3,'a')" id="asku3"
                                                            class="form-control select2">
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row" id="aguige4">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">规格类型4</label>
                                                <div class="col-sm-8">
                                                    <select onchange="skutypeChange(this.value,'asku4',4,'a')"
                                                            id="askutype4" class="form-control select2">
                                                        <option value="">请选择</option>
                                                        <option th:each="c:${skulist}" th:value="${c.id}"
                                                                th:text="${c.name}"></option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">规格4</label>
                                                <div class="col-sm-8">
                                                    <select onchange="skuChange(this.value,4,'a')" id="asku4"
                                                            class="form-control select2">
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row" id="aguige5">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">规格类型5</label>
                                                <div class="col-sm-8">
                                                    <select onchange="skutypeChange(this.value,'asku5',5,'a')"
                                                            id="askutype5" class="form-control select2">
                                                        <option value="">请选择</option>
                                                        <option th:each="c:${skulist}" th:value="${c.id}"
                                                                th:text="${c.name}"></option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">规格5</label>
                                                <div class="col-sm-8">
                                                    <select onchange="skuChange(this.value,5,'a')" id="asku5"
                                                            class="form-control select2">
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">商品图</label>
                                                <div class="col-sm-10">
                                                    <input id="mfileskupic" name="mfile" multiple type="file"
                                                           class="file"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-4 col-sm-offset-2">
                                            <button class="btn btn-primary" type="submit">保存内容</button>
                                            <button data-toggle="modal" type="button" class="btn btn-white"
                                                    href="#modal-sku-add-form">取消
                                            </button>
                                        </div>
                                    </div>
                                    <input id="hidaextids" name="extids" type="hidden" value=""/>
                                    <input id="hidaext1" name="ext1" type="hidden" value=""/>
                                    <input id="hidaext2" name="ext2" type="hidden" value=""/>
                                    <input id="hidaext3" name="ext3" type="hidden" value=""/>
                                    <input id="hidaext4" name="ext4" type="hidden" value=""/>
                                    <input id="hidaext5" name="ext5" type="hidden" value=""/>
                                    <input id="skuagid" name="gid" type="hidden" value=""/>
                                    <input id="hidskupic" name="pic" type="hidden" value=""/>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--修改Goods-SKU模态框-->
<div id="modal-sku-form" class="modal fade" aria-hidden="true">
    <div class="modal-dialog" style="width: 800px;">
        <div class="modal-content">
            <div class="modal-body">
                <div class="row">
                    <h3 class="m-t-none m-b">商品信息修改</h3>
                    <div class="col-sm-12">
                        <div class="ibox float-e-margins">
                            <div class="ibox-content">
                                <form id="mskuform" method="post" class="form-horizontal" action="skumodify"
                                      onsubmit="return checkskuModify()">
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">商品名*</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="skuname" name="name"
                                                           required type="text" maxlength="50"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">库存
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="skustores" name="stores" required/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">原价*</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="skuprice" name="price" required/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">实际售价*</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="skusaleprice" name="saleprice"
                                                           required/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">商品特色</label>
                                                <div class="col-sm-10">
                                                    <input class="form-control" id="skucharacteristic"
                                                           name="characteristic" type="text" maxlength="255"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">规格类型1*</label>
                                                <div class="col-sm-8">
                                                    <select onchange="skutypeChange(this.value,'msku1',1,'m')"
                                                            id="mskutype1" class="form-control select2">
                                                        <option th:each="c:${skulist}" th:value="${c.id}"
                                                                th:text="${c.name}"></option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">规格1*</label>
                                                <div class="col-sm-8">
                                                    <select onchange="skuChange(this.value,1,'m')" id="msku1"
                                                            class="form-control select2">
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row" id="mguige2">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">规格类型2</label>
                                                <div class="col-sm-8">
                                                    <select onchange="skutypeChange(this.value,'msku2',2,'m')"
                                                            id="mskutype2" class="form-control select2">
                                                        <option value="">请选择</option>
                                                        <option th:each="c:${skulist}" th:value="${c.id}"
                                                                th:text="${c.name}"></option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">规格2</label>
                                                <div class="col-sm-8">
                                                    <select onchange="skuChange(this.value,2,'m')" id="msku2"
                                                            class="form-control select2">
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row" id="mguige3">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">规格类型3</label>
                                                <div class="col-sm-8">
                                                    <select onchange="skutypeChange(this.value,'msku3',3,'m')"
                                                            id="mskutype3" class="form-control select2">
                                                        <option value="">请选择</option>
                                                        <option th:each="c:${skulist}" th:value="${c.id}"
                                                                th:text="${c.name}"></option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">规格3</label>
                                                <div class="col-sm-8">
                                                    <select onchange="skuChange(this.value,3,'m')" id="msku3"
                                                            class="form-control select2">
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row" id="mguige4">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">规格类型4</label>
                                                <div class="col-sm-8">
                                                    <select onchange="skutypeChange(this.value,'msku4',4,'m')"
                                                            id="mskutype4" class="form-control select2">
                                                        <option value="">请选择</option>
                                                        <option th:each="c:${skulist}" th:value="${c.id}"
                                                                th:text="${c.name}"></option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">规格4</label>
                                                <div class="col-sm-8">
                                                    <select onchange="skuChange(this.value,4,'m')" id="msku4"
                                                            class="form-control select2">
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row" id="mguige5">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">规格类型5</label>
                                                <div class="col-sm-8">
                                                    <select onchange="skutypeChange(this.value,'msku5',5,'m')"
                                                            id="mskutype5" class="form-control select2">
                                                        <option value="">请选择</option>
                                                        <option th:each="c:${skulist}" th:value="${c.id}"
                                                                th:text="${c.name}"></option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">规格5</label>
                                                <div class="col-sm-8">
                                                    <select onchange="skuChange(this.value,5,'m')" id="msku5"
                                                            class="form-control select2">
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">商品图</label>
                                                <div class="col-sm-10">
                                                    <input id="mfileskupic2" name="mfile" multiple type="file" class="file"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-4 col-sm-offset-2">
                                            <button class="btn btn-primary" type="submit">保存内容</button>
                                            <button data-toggle="modal" type="button" class="btn btn-white"
                                                    href="#modal-sku-form">取消
                                            </button>
                                        </div>
                                    </div>
                                    <!--<input id="hidskupic2" name="photos" type="hidden" value="" />-->
                                    <!--<input id="hidskuinfo2" name="info" type="hidden"  />-->
                                    <input id="hidmextids" name="extids" type="hidden" value=""/>
                                    <input id="hidmext1" name="ext1" type="hidden" value=""/>
                                    <input id="hidmext2" name="ext2" type="hidden" value=""/>
                                    <input id="hidmext3" name="ext3" type="hidden" value=""/>
                                    <input id="hidmext4" name="ext4" type="hidden" value=""/>
                                    <input id="hidmext5" name="ext5" type="hidden" value=""/>
                                    <input id="skuid" name="id" type="hidden" value=""/>
                                    <input id="hidskupic2" name="pic" type="hidden" value=""/>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div th:include="common/footer_js::footer"></div>

<input id="isAdmin" type="hidden" th:value="${isAdmin}"/>
<input id="isFenxiao" type="hidden" th:value="${isFenxiao}"/>
<input id="isPintuan" type="hidden" th:value="${isPintuan}"/>
<input id="skusize" type="hidden" th:value="${skusize}"/>
<input id="hidversion" type="hidden" th:value="${version}"/>

<script src="/js/admin/goods.js"></script>
<script th:inline="javascript">
    var msg = [[${msg}]];
    if (msg && msg.length > 0) {
        swal({title: "分销设置提示", text: msg, type: "error"})
    }
</script>
</body>
</html>
